package com.zcy.gift.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zcy
 * @since 2024-02-20
 */
@Data
@Accessors(chain = true)
@TableName("t_shop_car")
public class ShopCar extends Model<ShopCar> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("spu_id")
    private Long spuId;
    @TableField("spu_name")
    private String spuName;
    @TableField("sku_id")
    private Long skuId;
    @TableField("sku_info")
    private String skuInfo;
    private Integer num;
    @TableField("tenant_id")
    private Long tenantId;
    @TableField("tenant_name")
    private String tenantName;
    @TableField("user_id")
    private Long userId;
    private String username;
    /**
     * 是否已选
     */
    @TableField("is_select")
    private Boolean isSelect;
    /**
     * 加入购物车时价格
     */
    @TableField("add_price")
    private BigDecimal addPrice;
    private BigDecimal price;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;

    @TableField(exist = false)
    private Boolean isDelete = false; // 是否已删除


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
